<template>
  <div class="home">
    <van-nav-bar title="首页" />
  </div>
</template>

<script>
  import { mapState } from 'vuex'
  import { axios_driverexam } from '@/api/data_axios'
  export default {
    data() {
      return {
        type: 'c1', // 驾考类型
        subject: 1, //科目一
        pagesize: 20, // 每页数量
        pagenum: 1, // 页码
        sort: 'normal', // 排序方式 正常排序normal 随机排序rand
      }
    },
    computed: {
      ...mapState(['appkey']),
    },
    mounted() {
      this.getData()
    },
    methods: {
      getData() {
        console.log('2222')
        let data = {
          type: 'c1',
          subject: 1,
          pagesize: 20,
          pagenum: 1,
          sort: 'normal',
          appkey: this.appkey,
        }
        // axios_driverexam(data).then((res) => {
        //   console.log(res)
        // })
      },
    },
  }
</script>

<style lang="scss" scoped>
  .home {
    .van-nav-bar {
      background-color: $base-color;
      ::v-deep .van-nav-bar__title {
        font-weight: bold;
      }
    }
  }
</style>
